#ifndef UMLMETHODHIGHLIGHTER_H
#define UMLMETHODHIGHLIGHTER_H

#include <QSyntaxHighlighter>

#include "gui/editors/highlighters/umlhighlighter.h"
#include "uml/datatypedictionary.h"

class UmlMethodHighlighter : public UmlHighlighter
{
public:
    UmlMethodHighlighter(QTextDocument *parent, DatatypeDictionary *dictionary);

protected:
    DatatypeDictionary *_dataTypes;

    QTextCharFormat _visibilityFormat;
    QTextCharFormat _primitiveDatatypeFormat;
    QTextCharFormat _customDatatypeFormat;
    QTextCharFormat _methodNameFormat;

    QString regexForPrimitiveDatatypes() const;
    QString regexForCustomDatatypes() const;

    void applyFormat(Type type, int index, int length);

};

#endif // UMLMETHODHIGHLIGHTER_H
